﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    // NOTE: If you change the interface name "ICertificate" here, you must also update the reference to "ICertificate" in App.config.
    [ServiceContract(Namespace = "http://HRMService")]
    public interface ICheckTime
    {
        [OperationContract]
        bool CheckTime_Exist(string CardNo, DateTime Date);
        [OperationContract]
        DataSet CheckTime_GetAll(int DepartmentID, DateTime Start, DateTime End);

        [OperationContract]
        DataSet CheckTime_GetList(out int ItemCount, int currentPage, int pageSize, int branchID, int departmentID, int month, int year);

        [OperationContract]
        DataSet CheckTime_GetAllWithEmployee(int EmployeeID);

        [OperationContract]
        int CheckTime_Insert(CheckTimeInfo eInfo);

        [OperationContract]
        bool CheckTime_Update(CheckTimeInfo eInfo);

        [OperationContract]
        DataSet CheckTime_GetByDate(int EmployeeID, DateTime CheckDate);

        [OperationContract]
        DataSet CheckTime_GetByMonth(int CheckMonth);

        [OperationContract]
        DataSet CheckTime_GetInfo(string Check_ID);

        [OperationContract]
        bool CheckTime_Delete(int CheckID);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class CheckTimeInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        int _EmployeeID;
        [DataMember]
        public int EmployeeID
        {
            get { return _EmployeeID; }
            set { _EmployeeID = value; }
        }

        string _CardNo;
        [DataMember]
        public string CardNo
        {
            get { return _CardNo; }
            set { _CardNo = value; }
        }

        DateTime _Date;
        [DataMember]
        public DateTime Date
        {
            get { return _Date; }
            set { _Date = value; }
        }

        string _Status;
        [DataMember]
        public string Status
        {
            get { return _Status; }
            set { _Status = value; }
        }
        bool _IsInsert;
        [DataMember]
        public bool IsInsert
        {
            get { return _IsInsert; }
            set { _IsInsert = value; }
        }
    }
}

